package com.aaa.pojo;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName student
 */
@Data
public class Student implements Serializable {
    /**
     * 
     */
    private Integer aid;

    /**
     * 
     */
    private String aname;

    /**
     * 
     */
    private String asex;

    /**
     * 
     */
    private Integer aage;

    /**
     * 
     */
    private Integer bid;

    private School school;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Student other = (Student) that;
        return (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getAname() == null ? other.getAname() == null : this.getAname().equals(other.getAname()))
            && (this.getAsex() == null ? other.getAsex() == null : this.getAsex().equals(other.getAsex()))
            && (this.getAage() == null ? other.getAage() == null : this.getAage().equals(other.getAage()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getAname() == null) ? 0 : getAname().hashCode());
        result = prime * result + ((getAsex() == null) ? 0 : getAsex().hashCode());
        result = prime * result + ((getAage() == null) ? 0 : getAage().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", aid=").append(aid);
        sb.append(", aname=").append(aname);
        sb.append(", asex=").append(asex);
        sb.append(", aage=").append(aage);
        sb.append(", bid=").append(bid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}